<template>
    <div>
        // 父类
        class Prop{
            constructor(obj){            
                this.name = obj.name;
                this.color = obj.color;
            }
            say(){
                console.log("我的名字叫"+this.name+"我是"+this.color+"颜色的");
            }
            index(){
            console.log("自己")
            }
        }
        // 子类
        class Child extends Prop{
            constructor(name,color){
                super(name,color);// 调用父类的constructor(name,color)
                console.log("名字"+this.name + ',' + "颜色"+this.color);
            }
            say(){
                console.log("我是child");
                super.say();
            }
            change(){
            console.log(99)
            }
        }


        var wa=new child({
            name:"张超杰",
            color:"黑色"
        });
        wa.index();
    </div>
</template>
<script>
 
    export default {
        components: {
        },
        methods:{
            
        },
        mounted(){
            console.log(1 << 2 )
             // 4, 即 2的2次方
             console.log(1 << 10 )
            // 1024, 即 2的10次方

            // 但是要注意使用场景
            let a = 2e9;   // 2000000000.
            // console.log(a)
            a << 1;    // -294967296
            console.log(a)
        },
    };
</script>
<style lang="scss" scoped></style>